// 所有关于详情页的接口
import request from '../utils/request'
// 获取详情页数据接口
export function _getDetail(id){
  return request("/shop/goods/detail","get",{id:id})
}
// 加入购物车接口
export function _addCart(data){
  return request("/shopping-cart/add","post",data)
}
// 检查商品是否被收藏接口
export function _isColllection(goodsId){
  return request("/shop/goods/fav/check","get",{
    token:wx.getStorageSync("token"),
    type:0,
    goodsId:goodsId
  })
}
// 收藏接口
export function _collection(goodsId){
  return request("/shop/goods/fav/add","post",{
    type:0,
    goodsId:goodsId,
    token:wx.getStorageSync('token')
  })
}
// 取消收藏接口
export function _cancelCollection(goodsId){
  return request("/shop/goods/fav/delete","post",{
    type:0,
    goodsId:goodsId,
    token:wx.getStorageSync('token')
  })
}
  